package com.yjz.jvm.javaclone;

import org.junit.Test;

import java.util.Date;

public class CloneTest {
  @Test
  public void test() throws CloneNotSupportedException {
    Car car = new Car("bmw", "444", new Wheel("米其林轮胎"));
    Car car1 = car;
    System.out.println(car);
    System.out.println(car1.getWheel().getWheelName());
    Car car3 = (Car) car.clone();
    System.out.println(car3.getWheel().getWheelName());

    Date da = new Date();

  }
}
